#include "type.h"
#include "message.h"	
#include "protect.h"
#define  KEYBOARD_SERVER_PID	2
#define	SIZ	20
//调用汇编例成
void send2(Message* msg);
void recv2(Message* msg);
/*------------将字符串转化为对应的数字------------------*/
/**
* @parameter str 为字符串
* @parameter num 数位 	
**/
int itoa(char* str,int num){
	int	x=num;
	int	i=0;
	char* s=str;
	char* o="0123456789abcdef";
	do{
		*s++=o[x%16];
		i++;
	}while((x/=16)!=0);
	*s='\0';
	return i;
}
/*-------------------------------------------------------*/

void disp_int(int num){
	char str[16];
	char  str1[16];
	int i;
	int j=0;
	i=itoa(str,num);
	str1[j++]='0';
	str1[j++]='x';
	while(i--)
		str1[j++]=str[i];
	str1[j]='\0';
	dispStr(str1);
}
